package com.xing.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @version 1.0
 * @Author Xing
 * @Date 2024/2/19 1:08
 */
@Data
@TableName("con_conference_user")
@NoArgsConstructor
public class ConferenceUserEntity {
    @TableId(type = IdType.NONE)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    private Long userId;
    private Long conferenceId;
    private Integer con_role;
    private Date intoDate;
    private Date leaveDate;
    private Integer del_flag;
    private Date time;

    public ConferenceUserEntity(Long userId, Long conferenceId, Integer con_role, Date intoDate) {
        this.userId = userId;
        this.conferenceId = conferenceId;
        this.con_role = con_role;
        this.intoDate = intoDate;
        this.time = new Date(System.currentTimeMillis());
    }
}
